<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->

<head>
<meta charset="utf-8">
<title>订单统计</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="" name="description">
<meta content="" name="author">
<script>BASE_URL = '${request.getContextPath()}'</script>
<link href="${request.getContextPath()}/Public/assets/admin/css/css.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css">
<link rel="${request.getContextPath()}/Public/stylesheet" type="text/css" href="assets/global/plugins/jquery-notific8/jquery.notific8.min.css"/>
<link href="${request.getContextPath()}/Public/assets/global/css/components-rounded.css" id="style_components" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/css/plugins.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/admin/css/layout.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/admin/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color">
<link href="${request.getContextPath()}/Public/assets/admin/css/custom.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/css/kkpager.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/admin/css/common.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="${request.getContextPath()}/Public/assets/global/plugins/datatables/media/images/favicon.ico">
<link href="${request.getContextPath()}/Public/css/customerDetail.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="${request.getContextPath()}/Public/My97DatePicker/WdatePicker.js"></script>

<body class="page-header-top-fixed">
<div class="page-header">
	<!--头部开始-->
	<#include "/include/top.html" />
	<!-- 头部信息结束 -->

	<!-- 头部菜单开始 -->
	<#include "/include/top_menu.html" />
	<!-- 头部菜单结束 -->
</div>
<!-- END HEADER -->
<div class="page-container">
<div class="page-content">
		<div class="container-fluid">
			<ul class="page-breadcrumb breadcrumb">
				<li>
					<a href="#">首页</a><i class="fa fa-circle"></i>
				</li>
				<li class="active">
				统计分析<i class="fa fa-circle"></i>
				</li>
				<li class="active">
					订单统计
				</li>
			
			</ul>
			<div class="row margin-top-10">
				<div class="col-md-12">
					<div class="portlet light bordered">
		
							    <div class="portlet-body">

						   <form action="${request.getContextPath()}/ordercount/orderQuery.do" method="post">
					    <table class="table_white_bg">
					            <tbody>
					            	<tr>
					            
					                	 <td width="30xp"></td>				               
					                	<td>选择员工：</td>
					                	<td>
					            			<select id="userId" name ="userId" style="width: 200px;height: 30px">
					            			<option value="0">全部</option>
						            		<#list userlist as ulist >
					            				<option value="${ulist.id}" <#if userId?? &&  userId= ulist.id> selected</#if>>${ulist.name}</option>
					            				</#list>
					            			</select>
					            		</td>
					              		<td width="30xp"></td>
					              		<td>时间 ： </td>
					            			<td><input type="text" name="startDate"  id="startDate"    onClick="WdatePicker()" <#if startDate?? > value="${startDate}"</#if>    /></td>
					            			<td> - </td>
					            			<td><input type="text" name="endDate" id="endDate"   onClick="WdatePicker()"  <#if endDate?? > value="${endDate}"</#if>  /></td>
					            			<td width="30xp"></td>
					                	<td>
					                		<button type="submit" id="query" class="btn green pull-right">
											搜索<i class="m-icon-swapright m-icon-white"></i>
											</button>
					                	</td>
					                </tr>
					                
					            </tbody>
				            </table> 
						</form>
			           		 <div class="table-scrollable">
				          		<table class="table table-striped table-bordered table-advance table-hover ttTbl">
						          	<thead>
						          	
										<tr>
											<th>
												姓名
												
											</th>
											<th>
												 总洽谈数
											</th>
											<th>
												生成订单
											</th>
											<th>
												已确认订单
											</th>
											
										</tr>
									</thead>
									<tbody>
										<#list ordercountlist as order>
											<tr>
											
												<td>
													${order.userName}
												</td>
												<td>
												<#if order.qiatancount??>
													${order.qiatancount}
													<#else>
													0
													</#if>
													
												</td>
												<td>
												<#if order.builcount??>
													${order.builcount}
													<#else>
													0
													</#if>
												</td>
												<td>
												<#if order.firmcount??>
													${order.firmcount}
													<#else>
													0
													</#if>
												</td>
											</tr>
										</#list>
									</tbody>
								</table>
							</div>
					<div style="width:80%;margin:0 auto;">
							<div id="kkpager"></div>
							<input type="hidden" value="${totalPage}" id="totalPage">
							<input type="hidden" value="${totalRecords}" id="totalRecords">
							</div>
				</div>
			</div>
		</div>
	</div>
</div>
</div>
</div>

<!-- 底部开始 -->
<#include "/include/foot.html" />
<!-- 底部结束 -->

<!--[if lt IE 9]>
<script src="${request.getContextPath()}/Public/assets/global/plugins/respond.min.js"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/excanvas.min.js"></script>
<![endif]-->
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.js"></script>

<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js" type="text/javascript"></script>

<script src="${request.getContextPath()}/Public/assets/global/scripts/metronic.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/admin/scripts/layout.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/kkpager.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/admin/scripts/commonUtils.js" type="text/javascript"></script>
<script>
	

jQuery(document).ready(function() {
	   Metronic.init(); // init metronic core componets
	   Layout.init(); // init layout
	   CommonUtils.checkInit();
	});
	
	
	//初始化分页插件
	function getParameter(name) { 
		var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); 
		var r = window.location.search.substr(1).match(reg); 
		if (r!=null) return unescape(r[2]); return null;
	}
	
	//init
	$(function(){
		
		var userId=$("#userId").val();
		var startDate=$("#startDate").val();
		var endDate=$("#endDate").val();
		var totalPage = $('#totalPage').val();
		var totalRecords = $('#totalRecords').val();
		
		var pageNo = getParameter('pno');
		if(!pageNo){
			pageNo = 1;
		}
		//生成分页
		//有些参数是可选的，比如lang，若不传有默认值
		kkpager.generPageHtml({
			pno : pageNo,
			//总页码
			total : totalPage,
			//总数据条数
			totalRecords : totalRecords,
			
			getLink : function(n){
				return this.hrefFormer + this.hrefLatter + "?pno="+n+"&userId="+userId+"&startDate="+startDate+"&endDate="+endDate;
			}	
		});
	});
	
	
</script>
</body>
</html>